import request from '../utils/request'
export const queryPageApi = (params) => {
  return request({
    url: '/users',
    method: 'get',
    params
  })
}

export const addApi = (data) => {
  return request({
    url: '/users',
    method: 'post',
    data
  })
}
//根据id查询用户
export const queryByIdApi = (id) => {
  return request({
    url: `/users/${id}`,
    method: 'get'
  })
}
export const updateApi = (data) => {
  return request({
    url: '/users',
    method: 'put',
    data
  })
}

//批量删除
export const deleteBatchApi = (data) => {
  return request({
    url: '/users/batch',
    method: 'delete',
    data
  })
}
